home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 2.8 KB | 108 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWAplEvt.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: © 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWAPLEVT_H
- #define FWAPLEVT_H
-
- #ifndef FWDESC_H
- #include "FWDesc.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class ODAppleEvent;
- class FW_CPart;
- class FW_MScriptable;
- class FW_CFrame;
-
- //========================================================================================
- // class FW_CAppleEvent
- //========================================================================================
-
- class FW_CAppleEvent : public FW_CDesc
- {
- public:
- FW_DECLARE_AUTO(FW_CAppleEvent)
-
- FW_CAppleEvent();
- FW_CAppleEvent(ODAppleEvent* odAppleEvent);
- FW_CAppleEvent(const FW_CPart* part,
- ODEventClass eventClass,
- ODEventID eventID,
- const FW_CDesc& addressDesc);
-
- private:
- FW_CAppleEvent(const FW_CAppleEvent& other);
-
- public:
- virtual ~FW_CAppleEvent();
-
- FW_Boolean HasAttribute(ODDescType key) const;
-
- void GetAttributeByPtr(ODDescType dataType,
- void* dataPtr,
- Size* dataSize,
- Size maxSize,
- AEKeyword key) const;
-
- void PutAttributeByPtr(ODDescType dataType,
- const void* dataPtr,
- Size dataSize,
- AEKeyword key);
-
- void GetAttributeByDesc(AEKeyword key,
- FW_CDesc& desc,
- ODDescType desiredType = typeWildCard) const;
- void PutAttributeByDesc(AEKeyword key, const FW_CDesc& desc);
-
- void GetSubject(FW_CDesc& subjectDesc) const;
- void SetSubject(const FW_CDesc& subjectDesc);
-
- void GetTarget(FW_CDesc& targetDesc) const;
- void SetTarget(const FW_CDesc& targetDesc);
-
- AEKeyword GetEventClass() const;
- void SetEventClass(AEKeyword eventClass);
-
- AEKeyword GetEventID() const;
- void SetEventID(AEKeyword eventID);
-
- void SendToSelf(Environment* ev,
- FW_CFrame* toFrame,
- FW_CAppleEvent* resultEvent,
- ODSendPriority sendPriority,
- ODULong timeOutInTicks);
-
- operator ODAppleEvent*() const;
- operator ODAppleEvent**();
-
- protected:
-
- virtual ODDesc* PrivCreateODDesc(Environment* ev) const;
-
- private:
-
- short fReturnID;
- };
-
- //========================================================================================
- // Utility Functions
- //========================================================================================
-
- FW_CAppleEvent* FW_MakeSetLocalPropertyEvent(Environment* ev,
- FW_CPart* part,
- FW_MScriptable* theObject,
- ODDescType whichProperty,
- FW_CDesc& newValue);
-
-
- #endif // FWAPLEVT_H
-